define([
  'vue',
  'vue-router',
  'fe-wsList',
  'home',
  'register',
  'login',
  'personal'
], (...vue) => {

  const [
    Vue, Router, WorksList, Home, Register, Login, Personal
  ] = vue;

  Vue.use(Router);

  const router = new Router({
    linkActiveClass: '',
    linkExactActiveClass: '',
    mode: 'hash',
    routes: [
      {
        path: '/game',
        name: 'WorksList',
        components: {
          default: WorksList
        }
      },
      {
        path: '/',
        name: 'Home',
        component: Home 
      },
      {
        path: '/register',
        // name: 'Register',
        components: { 
          default: Register
        }
      },
      {
        path: '/login',
        name: 'Login',
        components:  {
          default: Login
        },
        children: [
          {
            path: 'register',// 不能加'/'
            component: Register
          }
        ]
      },
      {
        path: '/personal',
        name: 'Personal',
        component: Personal
      }
    ]
  });

  return router;
})